package org.example.what_mall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Schema(description = "评价")
@TableName("comments")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Comment {
    @Schema(description = "评价id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "用户id")
    @TableField(value = "userId")
    private Integer userId;

    @Schema(description = "商品id")
    @TableField(value = "goodsId")
    private Integer goodsId;

    @Schema(description = "商品详细id")
    @TableField(value = "goodsDetailId")
    private Integer goodsDetailId;

    @Schema(description = "评价内容")
    @TableField(value = "content")
    private String content;

    @Schema(description = "评分")
    @TableField(value = "score")
    private Integer score;

    @Schema(description = "评价时间")
    @TableField(value = "time")
    private LocalDateTime time;
}
